package com.xtaller.sdboot.controller; 

import com.xtaller.sdboot.entity.IamDepartmentUser; 
import com.xtaller.sdboot.service.IamDepartmentUserService; 
import com.xtaller.sdboot.utils.annotation.Permission; 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; 
import com.xtaller.sdboot.core.base.BaseController;
import io.swagger.annotations.Api; 
import io.swagger.annotations.ApiOperation; 
import io.swagger.annotations.ApiParam;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.io.Serializable; 
 
/** 
* 代码生成 
* @author: Taller  
* @date: 2020-03-30 09:57:23
* @Description: 组织架构人员关系表控制器 
*/ 
@Api(tags = "组织架构人员关系表控制器") 
@RestController 
@RequestMapping("/v1/iam/department/user") 
public class IamDepartmentUserController extends BaseController<IamDepartmentUser> { 
    @Autowired private IamDepartmentUserService iamDepartmentUserService; 
 
    @ApiOperation("表格") 
    @Permission(authorities = "iam:department:user:data:list")
    @Override
    public Object getByPage(HttpServletRequest request) throws Exception {
        return super.getByPage(request);
    } 
 
    @ApiOperation("创建")
    @Permission(authorities = "iam:department:user:opt:create")
    @Override
    public Object createEntity(@Valid @RequestBody IamDepartmentUser entity, HttpServletRequest request) throws Exception {
        return super.createEntity(entity, request);
    } 
 
    @ApiOperation("修改")
    @Permission(authorities = "iam:department:user:opt:update") 
    @Override
    public Object updateEntity(@PathVariable("id") Serializable id, @Valid @RequestBody IamDepartmentUser entity, HttpServletRequest request) throws Exception {
        return super.updateEntity(id, entity, request);
    } 
 
    @ApiOperation("删除")
    @Permission(authorities = "iam:department:user:opt:delete")
    @Override
    public Object deleteEntity(@PathVariable("id") Serializable id, HttpServletRequest request) throws Exception {
        return super.deleteEntity(id, request);
    } 
}
